<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1,
            maximum-scale=1">
    <link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/css/public.css" media="all">
    <script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>

</head>

<body>
    <div class="layuimini-container">
        <div class="layuimini-main">


            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>编辑绩效工资切块</legend>
            </fieldset>

            <form class="layui-form" action="" id="submitform">


                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">ID</label>
                    <div class="layui-input-block">
                        <input type="text" name="id" required lay-verify="required" autocomplete="off"
                            class="layui-input" value="{$info.id}">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">日期</label>
                    <div class="layui-input-block">
                        <input type="text" id="wage_date" name="wage_date" placeholder="请填写日期" autocomplete="off"
                            class="layui-input" value="{$info.wage_date}">
                    </div>

                </div>




                <div class="layui-form-item">
                    <label class="layui-form-label">教学任务经费</label>
                    <div class="layui-input-block">
                        <input type="text" name="teaching_task_fee" placeholder="请输入教学任务经费" lay-verify="required"
                            lay-reqtext="教学任务经费不能为空！！" value="{$info.teaching_task_fee}" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">管理服务经费</label>
                    <div class="layui-input-block">
                        <input type="text" name="manage_fee" placeholder="请输入管理服务经费" lay-verify="required"
                            lay-reqtext="管理服务经费不能为空！！" value="{$info.manage_fee}" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">缺额补贴经费</label>
                    <div class="layui-input-block">
                        <input type="text" name="vacancy_subsidy" placeholder="请输入管理服务经费" lay-verify="required"
                            lay-reqtext="管理服务经费不能为空！！" value="{$info.vacancy_subsidy}" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">特殊岗位津贴</label>
                    <div class="layui-input-block">
                        <input type="text" name="special_subsidy" placeholder="请输入特殊岗位津贴" lay-verify="required"
                            lay-reqtext="特殊岗位津贴不能为空！！" value="{$info.special_subsidy}" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">年度考核奖励经费</label>
                    <div class="layui-input-block">
                        <input type="text" name="annual_assess_fee" placeholder="请输入年度考核奖励经费" lay-verify="required"
                            lay-reqtext="年度考核奖励经费不能为空！！" value="{$info.annual_assess_fee}" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">校长奖励基金</label>
                    <div class="layui-input-block">
                        <input type="text" name="principal_award_fund" placeholder="请输入校长奖励基金" lay-verify="required"
                            lay-reqtext="校长奖励基金不能为空！！" value="{$info.principal_award_fund}" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">重大责任扣除经费</label>
                    <div class="layui-input-block">
                        <input type="text" name="deduction_major_liability" placeholder="请输入重大责任扣除经费"
                            lay-verify="required" lay-reqtext="重大责任扣除经费不能为空！！" value="{$info.deduction_major_liability}"
                            class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">调节经费</label>
                    <div class="layui-input-block">
                        <input type="text" name="mediation_funds" placeholder="请输入调节经费" lay-verify="required"
                            lay-reqtext="调节经费不能为空！！" value="{$info.mediation_funds}" class="layui-input">
                    </div>
                </div>



                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                        <button type="reset" class="layui-btn
                                layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
    <script>
        layui.use(['form', 'layedit', 'laydate'], function () {
            var form = layui.form
                , layer = layui.layer
                , laydate = layui.laydate;

            //日期
            laydate.render({
                elem: '#wage_date'
                , type: 'year'
            });
            //监听提交
            form.on('submit(demo1)', function (data) {
                $.ajax({
                    data: $('#submitform').serialize(),//json数据格式
                    url: "{:url('index/MeritPayCut/editPost')}",
                    type: 'post',
                    success: function (res) {
                        if (res.code == 1) {
                            layer.msg(res.msg);
                            setTimeout(function () {
                                location.href = res.url;
                                window.parent.location.reload();
                            }, 1000)
                        } else {
                            layer.msg(res.msg);
                        }
                    }
                });
                return false;
            });




        });
    </script>
</body>

</html>